<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/14
 * Time: 15:13
 * 添加考勤申请记录
 */


$oaa_leave_type       = $route->bodyParams['oaa_leave_type'];                    //请假类型 0-事假 1-病假 2-年假 3-婚假 4-产假 5-陪产假 6-其他
$oaa_start_time       = $route->bodyParams['oaa_start_time'];                    //开始时间
$oaa_end_time         = $route->bodyParams['oaa_end_time'];                      //结束时间
$oaa_time_length      = $route->bodyParams['oaa_time_length'];                   //时长
$oaa_images           = $route->bodyParams['oaa_images'];                         //图片
$oaa_reson            = $route->bodyParams['oaa_reson'];                          //请假理由
$oaa_department       = $route->bodyParams['oaa_department'];                    //所属部门
$oaa_reviewer         = $route->bodyParams['oaa_reviewer'];                       //审核人
$oaa_copy_user        = $route->bodyParams['oaa_copy_user'];                      //抄送人
$oaa_uid              = $route->bodyParams['oaa_uid'];                            //申请人ID
$oaa_last_reviewer    = $route->bodyParams['oaa_last_reviewer'];                 //最后审核人
$oaa_type             = $route->bodyParams['oaa_type'];                           //申请类型 0-请假 1-加班 2-调休 3-外出
$oaa_legal_holiday    = $route->bodyParams['oaa_legal_holiday'];
$oaa_accounting       = $route->bodyParams['oaa_accounting'];
$oaa_overtime_id      = $route->bodyParams['oaa_overtime_id'];
$oaa_oesid      = $route->bodyParams['oaa_oesid'];
$oaa_create_time      = time();                                                      //申请时间

//写入数组
$insertArr = [
    'oaa_leave_type'      => $oaa_leave_type,
    'oaa_start_time'      => $oaa_start_time,
    'oaa_end_time'        => $oaa_end_time,
    'oaa_time_length'    => $oaa_time_length,
    'oaa_images'          => $oaa_images,
    'oaa_reson'           => $oaa_reson,
    'oaa_department'     => $oaa_department,
    'oaa_reviewer'       => $oaa_reviewer,
    'oaa_copy_user'      => $oaa_copy_user,
    'oaa_uid'             => $oaa_uid,
    'oaa_last_reviewer'  => $oaa_last_reviewer,
    'oaa_type'            => $oaa_type,
    'oaa_create_time'    => $oaa_create_time,
    'oaa_legal_holiday'  => $oaa_legal_holiday,
    'oaa_accounting'            => $oaa_accounting,
    'oaa_overtime_id'    => $oaa_overtime_id,
    'oaa_oesid'    => $oaa_oesid,
];
//执行写入语句
$rsData = $db->mysqlDB->insert("oa_attendance_application",$insertArr);

//返回成功结果
$response->responseData( true, $rsData );
